<template>
  <div class="title-container">
    <div class="label">
      <div class="tag-circle"  v-if="showTagCircle"></div>
      <div class="title" isClose>{{ title }}</div>
    </div>
    <el-icon v-if="isClose" @click="handelClose"><Close /></el-icon>
  </div>
</template>

<script setup>
import { Close } from "@element-plus/icons-vue";

defineProps({
  title: {
    type: String,
    default: ""
  },
  isClose: Boolean,
  isIcon:Boolean,
  showTagCircle: {
    type: Boolean,
    default: true // 可选：设置默认值
  }
});
const emit = defineEmits(["close"]);
const handelClose = () => {
  emit("close");
};
</script>

<style scoped lang="scss">
@use "@/assets/styles/mixin";
.title-container {
  @include mixin.flex-between;
  font-size: 18px;
  color: #131414;
  line-height: 24px;
  .label {
    @include mixin.flex-align;
  }
  .tag-circle {
    width: 6px;
    height: 6px;
    margin-right: 9px;
    border-radius: 50%;
    background-color: #409eff;
  }
  :deep(.el-icon) {
    cursor: pointer;
  }
}
</style>
